package com.sunshine.spring.aop.advice.before;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Author: WeiHong
 * @Date: 2017/3/23 14:31
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("advice/before.xml");
        CustomerService service = (CustomerService) context.getBean("proxyFactoryBean");

        service.printName();
        service.printUrl();

       /*try {
            service.printThrowException();
        } catch (Exception e) {
            e.printStackTrace();
        }*/
    }
}
